﻿using System;
using System.Collections.Generic;
using Algoritmia.DataStructures.Maps;

namespace Algoritmia.DataStructures.PriorityMaps
{
    public class MinHeapMap<TKey, TValue> : HeapMap<TKey, TValue>
        where TValue : IComparable<TValue>
    {
        public MinHeapMap(IEnumerable<KeyValuePair<TKey, TValue>> data = null,
            int capacity = 0,
            Func<IEnumerable<KeyValuePair<TKey,TValue>>,IMap<TKey, int>> createMap = null,
            Func<IMap<TKey, int>, TKey, IMap<TKey, int>> redimensionMap = null)
            : base(data, capacity, null,
            (kv1,kv2) => kv1.Value.CompareTo(kv2.Value), createMap, redimensionMap)
        {
        }
    }
}
